@extends('layouts.layout')

@section('header')

    <title>我的邀请</title>

    <link rel="stylesheet" type="text/css" href="{{URL::asset('static/css/address.css')}}"/>
    <style>
        .address{
            padding: .1rem .3rem;
            text-align: center;
        }
        .address .top{
            flex-wrap: nowrap;
        }
        .address .user_info{
            font-size: .26rem !important;
        }
        .address .top div{
            width: 25%;
            overflow: hidden;
            height: .4rem;
            line-height: .4rem;
            word-break: break-all
        }
        .address .top div.avatar{
            width:.8rem;
        }
        .avatar img{
            width:.5rem;
            height: auto;
        }
    </style>
@endsection

@section('content')

    @isset($datas)

        <a class="address shadow" href="javascript:;">
            <div class="user_info">
                <div class="top">
                    <div class="avatar">头像</div>
                    <div >姓名</div>
                    <div>手机号</div>
                    <div>邀请时间</div>
                </div>
            </div>
        </a>

        @foreach ($datas as $data)

        <a class="address shadow" href="javascript:;">
        	<div class="user_info">
        		<div class="top">
                    <div class="avatar"><img src="{{ $data->avatar }}" alt=""></div>
                    <div>{{ $data->name }}</div>
                    <div>{{ $data->phone }}</div>
                    <div>{{ substr($data->created_at , 0 , 10) }}</div>
                </div>
        	</div>
        </a>

        @endforeach
    @endisset
